<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableCategorys extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('categorys',function (Blueprint $table) {
            $table->increments('id')->comment('主键id');
            $table->string('title',64)->default('')->comment('标题');
            $table->unsignedBigInteger('parentid')->default('0')->comment('父类id');
            $table->string('path')->default('0')->comment('路径');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('categorys');
    }
}
